home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr47
/
wasm223.zip
/
TIMER
< prev
next >
Wrap
Text File
|
1993-05-04
|
944b
|
34 lines
//
// SESSION Timer Routines, By Eric Tauck
//
Timer_End JUMP
: _ExpireTime { 0 } // used by timer routines
// ----------------------------------
// Set the time to wait for an event.
// ----------------------------------
: TimerReset // (ticks - )
_ExpireTime ! RESET ; // store to global variable and reset timer
// --------------------------------------
// Check if the time to wait has expired.
// --------------------------------------
: TimerExpired // ( - 0 | -1)
_ExpireTime @ TICKS < ; // check if ticks are greater
// --------------------------
// Pause for a tick duration.
// --------------------------
: Pause // (ticks - )
TimerReset CALL // reset timer
: Pause1
TimerExpired CALL // check if expired
NOT Pause1 ?JUMP ; // loop back if not
: Timer_End